package com.dto;

import com.utils.TimeFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Date;

public class MeetingViewDTO {

    /**
     * 会议室名称
     */
    private String roomName;

    /**
     * 会议室位置
     */
    private String roomLocation;

    /**
     * 会议日期
     */
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date useDate;

    /**
     * 会议时间
     */
    private Integer useTime;

    private String result;

    /**
     * 会议主题
     */
    private String theme;

    /**
     * 会议室摘要
     */
    private String abstracts;

    /**
     * 申请人
     */
    private String applicantName;

    /**
     * 审批人
     */
    private String approvalName;

    /**
     * 申请状态
     */
    private String status;

    /**
     * 签到状态
     */
    private String checkStatus;

    private String summaryUrl;

    public String getSummaryUrl() {
        return summaryUrl;
    }

    public void setSummaryUrl(String summaryUrl) {
        this.summaryUrl = summaryUrl;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public String getRoomLocation() {
        return roomLocation;
    }

    public void setRoomLocation(String roomLocation) {
        this.roomLocation = roomLocation;
    }

    public Date getUseDate() {
        return useDate;
    }

    public void setUseDate(Date useDate) {
        this.useDate = useDate;
    }

    public Integer getUseTime() {
        return useTime;
    }

    public void setUseTime(Integer useTime) {
        this.useTime = useTime;
        this.result = TimeFormat.toString(useTime);
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public String getAbstracts() {
        return abstracts;
    }

    public void setAbstracts(String abstracts) {
        this.abstracts = abstracts;
    }

    public String getApplicantName() {
        return applicantName;
    }

    public void setApplicantName(String applicantName) {
        this.applicantName = applicantName;
    }

    public String getApprovalName() {
        return approvalName;
    }

    public void setApprovalName(String approvalName) {
        this.approvalName = approvalName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(String checkStatus) {
        this.checkStatus = checkStatus;
    }

    public MeetingViewDTO(String roomName, String roomLocation, Date useDate, Integer useTime, String theme, String abstracts, String applicantName, String approvalName, String status, String checkStatus) {
        this.roomName = roomName;
        this.roomLocation = roomLocation;
        this.useDate = useDate;
        this.useTime = useTime;
        this.theme = theme;
        this.abstracts = abstracts;
        this.applicantName = applicantName;
        this.approvalName = approvalName;
        this.status = status;
        this.checkStatus = checkStatus;
    }

    @Override
    public String toString() {
        return "MeetingViewDTO{" +
                "roomName='" + roomName + '\'' +
                ", roomLocation='" + roomLocation + '\'' +
                ", useDate=" + useDate +
                ", useTime=" + useTime +
                ", theme='" + theme + '\'' +
                ", abstracts='" + abstracts + '\'' +
                ", applicantName='" + applicantName + '\'' +
                ", approvalName='" + approvalName + '\'' +
                ", status='" + status + '\'' +
                ", checkStatus='" + checkStatus + '\'' +
                '}';
    }
}
